/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.sms.entity;

import com.chlitina.store.common.persistence.BaseEntity;
import com.chlitina.store.modules.base.entity.Customer;

/**
 * 店面群发短信详情复合主键
 * 
 * @author lvbo
 * @version 2013-07-11
 */
public class SmsStoreGroupLogDetailPK extends BaseEntity {

	private static final long serialVersionUID = 1L;
	private SmsStoreGroupLog smsStoreGroupLog; // 短信日志
	private Customer customer; // 客户

	public SmsStoreGroupLogDetailPK() {
	}

	public SmsStoreGroupLog getSmsStoreGroupLog() {
		return smsStoreGroupLog;
	}

	public void setSmsStoreGroupLog(SmsStoreGroupLog smsStoreGroupLog) {
		this.smsStoreGroupLog = smsStoreGroupLog;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	@Override
	public int hashCode() {
		return this.getCustomer().hashCode()
				+ this.getSmsStoreGroupLog().hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final SmsStoreGroupLogDetailPK other = (SmsStoreGroupLogDetailPK) obj;
		if (smsStoreGroupLog.getId() == other.getSmsStoreGroupLog().getId()
				&& customer.getId() == other.getCustomer().getId()) {
			return true;
		}
		return false;
	}
}
